<?php
namespace Wap\Controller;

class AccessController
{
	public function __construct()
	{
		parent::__construct();

		$this->praise = I( "get.praise", "", "" );
		if( empty($this->praise) ){
			$this->praise = I( "post.praise", "", "" );
		}

		$result = PraiseService::is_good( $this->praise, time() );
		if( $result['good'] == false ){
			$this->error( $result['msg'] );
		}
	}
}